From: Florian Müllner Date: Mon, 23 Oct 2017 08:06:18 +0000 (+0200) Subject: windowAttentionHandler: Follow app policy for attention notifications X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~994^2^2~159 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=eecbd4dd42aad17240d2bae89a64789cea5459d3;p=gnome-shell.git windowAttentionHandler: Follow app policy for attention notifications While window attention notifications are created by the shell itself rather than applications (most likely as a result of focus stealing prevention), users still commonly link them to the application for which they are shown. It makes therefore sense to follow the appropriate policy set by the user rather than showing them unconditionally. https://bugzilla.gnome.org/show_bug.cgi?id=779974 --- diff --git a/js/ui/windowAttentionHandler.js b/js/ui/windowAttentionHandler.js index d56f6b20b..edd671a2c 100644 --- a/js/ui/windowAttentionHandler.js +++ b/js/ui/windowAttentionHandler.js @@ -79,6 +79,15 @@ var Source = new Lang.Class({ this.signalIDs = []; }, + _createPoliy: function() { + if (this._app && this._app.get_app_info()) { + let id = this._app.get_id().replace(/\.desktop$/,''); + return new MessageTray.NotificationApplicationPolicy(id); + } else { + return new MessageTray.NotificationGenericPolicy(); + } + }, + createIcon : function(size) { return this._app.create_icon_texture(size); },